package sc.prototype.pfs.test.eventnotify.executor;

import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import sc.prototype.pfs.eventnotify.executor.NotifyExecutor;
import sc.prototype.pfs.eventnotify.executor.NotifyExecutorFactory;
import sc.prototype.pfs.eventnotify.model.Notice;
import sc.prototype.pfs.eventnotify.model.NotifyContext;
import sc.prototype.pfs.eventnotify.model.NotifyResult;
import sc.prototype.pfs.eventnotify.model.ParamKey;

public class MockNotifyExecutorFactory implements NotifyExecutorFactory {

    @Override
    public NotifyExecutor create(Notice notice) {
        return new NotifyExecutor() {

            Logger logger = LoggerFactory.getLogger(this.getClass());

            @Override
            public NotifyResult processSendNotice(Notice notice, NotifyContext context) {
                logger.info("sendNotice, notice:{}", notice);
                return NotifyResult.success("[mock success]");
            }

            @Override
            public List<ParamKey> getExtParamKeys() {
                return null;
            }
        };
    }

}
